﻿using System.Data;
using MyWeb.Data;

namespace MyWeb.Business
{
    public class UserService
    {
        private readonly UserController _userController = new UserController();

        #region [User_CheckLogin]

        public DataTable User_CheckLogin(string user, string pass)
        {
            return _userController.User_CheckLogin(user, pass);
        }

        #endregion

        #region [User_GetByAll]

        public DataTable User_GetByAll()
        {
            return _userController.User_GetByAll();
        }

        #endregion

        #region [User_GetById]

        public DataTable User_GetById(int Id)
        {
            return _userController.User_GetById(Id);
        }

        #endregion

        #region [User_Insert]

        public void User_Insert(UserInfo user)
        {
            _userController.User_Insert(user);
        }

        #endregion

        #region [User_Update]

        public void User_Update(UserInfo user)
        {
            _userController.User_Update(user);
        }

        #endregion

        #region [User_UpdateNoPass]

        public void User_UpdateNoPass(UserInfo user)
        {
            _userController.User_UpdateNoPass(user);
        }

        #endregion

        #region [User_Delete]

        public void User_Delete(int Id)
        {
            _userController.User_Delete(Id);
        }

        #endregion

        #region [User_ActiveStatus]

        public void User_ActiveStatus(int id, bool status)
        {
            _userController.User_ActiveStatus(id, status);
        }

        #endregion

        #region [User_GetUserId]

        public string User_GetUserId(string username)
        {
            return _userController.User_GetUserId(username);
        }

        #endregion

        #region [User_PasswordChange]

        public void User_PasswordChange(string tennguoidung, string matkhaucu, string matkhaumoi)
        {
            _userController.User_PasswordChange(tennguoidung, matkhaucu, matkhaumoi);
        }

        #endregion

        #region [User_LosePassword]

        public void User_LosePassword(string username, string password)
        {
            _userController.User_LosePassword(username, password);
        }

        #endregion

        #region [User_GetUsername]

        public DataTable User_GetUsername(string email)
        {
            return _userController.User_GetUsername(email);
        }

        #endregion

        #region [User_GetId]

        public int User_GetId()
        {
            return _userController.User_GetId();
        }

        #endregion
    }
}